#pragma once
#include "FairMonitor.h"

class Synchronized
{
public:
    Synchronized(FairMonitor* p)
    {
        m = p;
        m->BeginSynchronized();
    }
    ~Synchronized()
    {
        m->EndSynchronized();
    }

private:
    FairMonitor* m;
};